Good evening!
What a mistake that then?
...Я чомусь її сам не бачу
... For some reason I do not see it myself
Code:
class Integer2
{
private:
int value;
public:
Integer2(int i): value(i)
{}
Integer2& operator=(const Integer2& right) {
//проверка на самоприсваивание
if (this == &right) {
return *this;
}
value = right.value;
return *this;
}
void Print( )
{
std::cout<<"value "<< value<std::endl;
}
};
int main(){
Integer2 ob1(10),ob2(35);
ob1 Print(); ob2 Print();
ob1= ob2 ;
ob1 Print; ob2 Print;
return 0;
}
84 40 C:\T\Perevantazh.cpp [Error] no match for 'operator<' in '(& std:perator<< <std::char_traits<char> >((* & std::cout), ((const char*)"value ")))->std::basic_ostream<_CharT, _Traits>:perator<< <char, std:
I do not know, maybe I was misled, or do not see that something simple, but I do not understand what the compiler says. I do not understand the error, and not think at all.
Oh, it is written with a point. I'm sure all misled. As I write this? Wow.
Now I must correct myself.
void Print(  
{
std::cout<<"value "<< value<std::endl;
}
It is this feature really, still has an error which I can not fix myself.
Oh, wow! Everything has now happened all fixed, that is all very well now. All right!
I wish to all, many winter holidays, which are already very close, celebrate well, a lot of joy and fun that would be very, good and different! Cheerful mood and happy holidays!